<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of nv</title>
  <meta name="keywords" content="nv">
  <meta name="description" content="nv(g) --- number of vertices in g">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="../index.html">matgraph</a> &gt; <a href="index.html">@graph</a> &gt; nv.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for matgraph/@graph&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>nv
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>nv(g) --- number of vertices in g</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function n = nv(g) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> nv(g) --- number of vertices in g</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="across.html" class="code" title="function elist = across(g,X,Y)">across</a>	across(g,X,Y) --- find all edges with one end in X and other end in Y.</li><li><a href="add.html" class="code" title="function add(g,i,j)">add</a>	add --- add edge(s) to the graph</li><li><a href="bfstree.html" class="code" title="function bfstree(t,g,v)">bfstree</a>	bfstree(t,g,v) --- create a breadth-first spanning tree of g</li><li><a href="bipartition.html" class="code" title="function p = bipartition(g)">bipartition</a>	part = bipartition(g) --- find bipartition of a bipartite graph</li><li><a href="bipmatch.html" class="code" title="function elist = bipmatch(g,X,Y)">bipmatch</a>	bipmatch --- maximum matching in a bipartite graph</li><li><a href="cartesian.html" class="code" title="function cartesian(g,h1,h2)">cartesian</a>	cartesian(g,h1,h2) --- overwrite g with the product of h1 and h2</li><li><a href="cayley.html" class="code" title="function cayley(g,perms,verbose)">cayley</a>	cayley(g,perms) -- create a Cayley graph (undirected)</li><li><a href="cdraw.html" class="code" title="function cdraw(g,coloring,line_style,color_matrix)">cdraw</a>	cdraw(g,coloring) -- draw g with a given vertex coloring</li><li><a href="clear_edges.html" class="code" title="function clear_edges(g)">clear_edges</a>	clear_edges(g) --- delete all edges of g</li><li><a href="color.html" class="code" title="function p = color(g,algo,max_time)">color</a>	color(g,algo) --- color the graph g by a given algorithm</li><li><a href="complement.html" class="code" title="function complement(g,h)">complement</a>	graph complement</li><li><a href="complete.html" class="code" title="function complete(g,a,b)">complete</a>	complete: build complete and complete multipartite graphs</li><li><a href="component.html" class="code" title="function vtcs = component(g,v)">component</a>	component(g,v) -- find vertices in v's component of g</li><li><a href="components.html" class="code" title="function p = components(g)">components</a>	components(g) --- find the components of the graph g</li><li><a href="contract.html" class="code" title="function contract(g,u,v)">contract</a>	contract(g,u,v) --- contract v into u</li><li><a href="copy_labels.html" class="code" title="function copy_labels(g,h)">copy_labels</a>	copy_labels(g,h) --- copy labels from h to g</li><li><a href="delete.html" class="code" title="function delete(g,i,j)">delete</a>	delete --- delete vertices or edges from a graph</li><li><a href="dfstree.html" class="code" title="function dfstree(t,g,v)">dfstree</a>	dfstree(t,g,v) --- create a depth-first spanning tree of g</li><li><a href="disjoint_union.html" class="code" title="function disjoint_union(g,h,k)">disjoint_union</a>	disjoint_union(g,h,k) --- overwrite g with the disjoint union of the</li><li><a href="display.html" class="code" title="function display(g)">display</a>	display(g) --- display basic information about a graph object</li><li><a href="dist.html" class="code" title="function d = dist(g,v,w)">dist</a>	dist(g,v,w) and dist(g,v) --- find distance(s) between vertices</li><li><a href="distxy.html" class="code" title="function e = distxy(g, D)">distxy</a>	distxy(g) -- give g a distance based embedding</li><li><a href="dom.html" class="code" title="function [d,S] = dom(g)">dom</a>	[d,S] = dom(g) --- domination number of g</li><li><a href="dot.html" class="code" title="function dot(g,filename)">dot</a>	dot(g,filename) --- save graph for use by graphviz.</li><li><a href="draw.html" class="code" title="function draw(g,line_style)">draw</a>	draw(g) --- draw g in a figure window</li><li><a href="draw_labels.html" class="code" title="function draw_labels(g,offset)">draw_labels</a>	draw_labels(g) --- add labels to a drawing of g</li><li><a href="embed.html" class="code" title="function embed(g,xy)">embed</a>	embed --- create an embedding for a graph</li><li><a href="find_path.html" class="code" title="function p = find_path(g,u,v)">find_path</a>	find_path(g,u,v) --- find a shortest path from u to v</li><li><a href="graffle.html" class="code" title="function graffle(g, filename, width, rad)">graffle</a>	graffle(g, filename, width, rad) --- write graph in OmniGraffle format</li><li><a href="hamiltonian_cycle.html" class="code" title="function [hlist, exists] = hamiltonian_cycle(g,h)">hamiltonian_cycle</a>	hamiltonian_cycle(g) --- find a Hamiltonian cycle in g (if one exists)</li><li><a href="has.html" class="code" title="function yn = has(g,u,v)">has</a>	has --- check if the graph has a particular vertex or edge</li><li><a href="has_path.html" class="code" title="function yn = has_path(g,u,v)">has_path</a>	has_path(g,u,v) --- determine if there is a path from u to v in g</li><li><a href="hasxy.html" class="code" title="function yn = hasxy(g)">hasxy</a>	hasxy(g) --- determine if an embedding has been created for g</li><li><a href="intersect.html" class="code" title="function intersect(g,h1,h2)">intersect</a>	intersect(g,h1,h2) --- g is set to the intersection of h1 and h2.</li><li><a href="isconnected.html" class="code" title="function yn = isconnected(g)">isconnected</a>	isconnected(g) --- test if g is a connected graph</li><li><a href="iso.html" class="code" title="function [yn,p] = iso(g,h,options)">iso</a>	[yn,p] = iso(g,h,options) --- is g isomorphic to h?</li><li><a href="join.html" class="code" title="function join(g,h1,h2)">join</a>	join(g,h1,h2) --- overwrite g with the join of h1 and h2</li><li><a href="label.html" class="code" title="function label(g,v,name)">label</a>	Assign labels to vertices of g</li><li><a href="laplacian.html" class="code" title="function m = laplacian(g,s)">laplacian</a>	laplacian(g) --- get the Laplacian matrix of g</li><li><a href="load.html" class="code" title="function load(g,filename)">load</a>	load(g,filename) --- read a saved graph on disk</li><li><a href="match_join.html" class="code" title="function match_join(g,h1,h2)">match_join</a>	match_join(g,h1,h2) --- overwrite g with a graph formed from disjoint</li><li><a href="mdsxy.html" class="code" title="function DD = mdsxy(g,D)">mdsxy</a>	mdsxy(g) -- create an embedding based on multidimensional scaling</li><li><a href="nauty.html" class="code" title="function nauty(g, filename)">nauty</a>	nauty(g,filename) -- save a graph in nauty format</li><li><a href="ndraw.html" class="code" title="function ndraw(g,line_style)">ndraw</a>	ndraw(g) --- draw g in a figure window with numbered vertices</li><li><a href="neighbors.html" class="code" title="function nlist = neighbors(g,v)">neighbors</a>	neighbors(g,v) --- neighbors of v as a list.</li><li><a href="nsptrees.html" class="code" title="function nt = nsptrees(g)">nsptrees</a>	nsptrees(g) --- number of spanning trees of g.</li><li><a href="prufer.html" class="code" title="function output = prufer(g, code)">prufer</a>	prufer --- convert a tree to/from its Prufer code</li><li><a href="random.html" class="code" title="function random(g,arg1,arg2)">random</a>	random --- overwrite g with a random graph</li><li><a href="randxy.html" class="code" title="function randxy(g)">randxy</a>	randxy(g) --- give g a random embedding in the plane</li><li><a href="renumber.html" class="code" title="function renumber(g,perm)">renumber</a>	renumber the vertices of a graph</li><li><a href="resistance.html" class="code" title="function R = resistance(g)">resistance</a>	R = resistance(g) --- calculate resistances between vertices</li><li><a href="resize.html" class="code" title="function resize(g, n)">resize</a>	resize(g,n) --- change the number of vertices in g to n</li><li><a href="save.html" class="code" title="function save(g,filename)">save</a>	save(g,filename) --- save a graph to disk</li><li><a href="sgf.html" class="code" title="function A = sgf(g,M)">sgf</a>	sgf --- simple graph format: a 2-column matrix representation</li><li><a href="size.html" class="code" title="function [sz,tz] = size(g)">size</a>	size(g) --- returns [nv,ne] for the graph</li><li><a href="springxy.html" class="code" title="function e=springxy(g)">springxy</a>	springxy(g) --- find a spring embedding of g</li><li><a href="subsref.html" class="code" title="function nvec = subsref(g,S)">subsref</a>	subsref implements the notation g(v) and g(v,w)</li><li><a href="trim.html" class="code" title="function trim(g,d)">trim</a>	trim(g,d) --- iteratively remove vertices of degree at most d</li><li><a href="union.html" class="code" title="function union(g,h1,h2)">union</a>	union(g,h1,h2) --- set g equal to the union of h1 and h2.</li><li><a href="wheel.html" class="code" title="function wheel(g,n)">wheel</a>	wheel(g,n) --- overwrite g with a wheel graph on n vertices</li></ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function n = nv(g) </a>
0002 <span class="comment">% nv(g) --- number of vertices in g</span>
0003 
0004 <span class="keyword">global</span> GRAPH_MAGIC
0005 n = length(GRAPH_MAGIC.graphs{g.idx}.array);</pre></div>
<hr><address>Generated on Fri 30-Apr-2010 07:51:16 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>